Public Partial Class UpdateKB
    Inherits System.Web.UI.Page

   
   
    Private Sub updpnlUpdate_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles updpnlUpdate.Load
        Dim strControlName As String
        strControlName = Page.Request.Params.Get("__EVENTARGUMENT")
        If IsPostBack Then
            If strControlName.Contains("Update") Then
                Try
                    txtError.Visible = False
                    Dim args(4) As String
                    args(0) = txtErrorType.Text
                    args(1) = txtErrorDescription.Text
                    args(2) = txtErrorInformation.Text
                    args(3) = txtResolution.Text
                    args(4) = txtRootCause.Text
                    sqlhelper.InsertKB(args)
                Catch ex As Exception
                    txtError.Visible = True
                    txtError.Text = ex.ToString
                End Try
            End If
        End If
    End Sub

    Private Sub updpnlView_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles updpnlView.Load
        Dim strControlName As String
        strControlName = Page.Request.Params.Get("__EVENTARGUMENT")
        If IsPostBack Then
            If strControlName.Contains("View") Then
                Try
                    txtErrorView.Visible = False
                    gridKbDetails.DataSource = sqlhelper.GetKBDetails("")
                    gridKbDetails.DataBind()
                Catch ex As Exception
                    txtErrorView.Visible = True
                    txtError.Text = ex.ToString
                End Try
            End If

        End If
    End Sub
End Class